package com.sunshine.config;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Sentinel切面配置类
 * 用于启用@SentinelResource注解的支持
 */
@Configuration
public class SentinelAspectConfiguration {
    
    /**
     * 配置Sentinel资源切面
     * 使@SentinelResource注解生效
     * @return SentinelResourceAspect
     */
    @Bean
    public SentinelResourceAspect sentinelResourceAspect() {
        return new SentinelResourceAspect();
    }
}